home *** CD-ROM | disk | FTP | other *** search
- How to create a multi-user configuration (Pro versions only)
-
- There are three options. The first option is to add the following section
- to the Ide\master.ini file:
-
- [Workspace]
- DataPath=CSIDL_APPDATA
-
- This will put each users configuration data in <Documents and Settings>\
- <user name>\Application Data\<IDE name>.
-
- The master.ini file must be located in the Ide folder.
-
- The second option to activate a multiuser configuration is to
- create an onLogon.script and put it in Tools/EventHandlers/Startup.
- This will result in a Logon dialog being shown during startup to
- allow you to set a unique Data folder path for each user. You can
- use the sample script shown below as a starting point for your onLogon
- script.
-
- A third option is to run the createUserContext script in Tools/Application.
- This will create a create an application context that has its own data folder.
- This script creates a new shortcut that will start the IDE using the specified data
- folder. Each context will have its own state including window list, last project,
- toolbar states, findParameters, and so on. This script uses the /inifile command
- line option.
-
- Copyright ⌐ 2000-2002 - Modelworks Software
-
- /**
- @Event: onLogon~processes the results from the logon dialog. The
- logon dialog is only activated if this script is named onLogon.script
- and is located in Tools/EventHandlers/Startup. This script can be used
- by when multiple users will be using the same installation, such as in
- network installations, so that each user can have their own
- configuration. The sample implementation shown below saves user
- configuration in the Users folder in the servers IDE folder. Return true
- to continue and false to exit.
- @EndTool:
- @Summary: onLogon~processes the results from the logon dialog
- */
-
- // Store the UserDatabase in the default Data folder
- var gUserDatabaseMapPath = File.getApplicationPath() + "\\Ide\\Data\\UserDatabase.map";
- var gUserDatabaseMapMapFile = getMapFile(gUserDatabaseMapPath);
-
- var gRootDirectory = File.getApplicationPath() + "\\Users\\";
-
- // The gUserDatabaseMapMapFile should be loaded by another script
- gUserDatabaseMapMapFile.add("admin", Application.hash("admin"));
- gUserDatabaseMapMapFile.add("test", Application.hash("test"));
-
- function OnEvent(name, password)
- {
- if (gUserDatabaseMapMapFile.lookup(name) == Application.hash(password))
- {
- if (name == "admin")
- {
- return true; // use default Data folder located in Ide/Data
- }
- else
- {
- Application.dataPath = gRootDirectory + name;
- return true; // use the new dataPath
- }
- }
- return false; // Do not continue
- }
-
-